<%@ page contentType="text/html; charset=utf-8"
 pageEncoding="utf-8" trimDirectiveWhitespaces="true" %>
<%@page import="skyinline.j2ee.basic.projectv5.dao.BoardDAO"%> 
<%@page import="skyinline.j2ee.basic.projectv5.model.BoardVO"%>
		<style type="text/css">
			table { width: 75%; margin: 0 auto;
				border-collapse: collapse;
				table-layout: fixed }
			th, td { border : 1px solid black;
				padding: 10px; text-align: center; }
			.bdtitle { text-align: left; white-space: nowrap;
				overflow: hidden; 	text-overflow: ellipsis; }
			.cpage { font-size: 2em; color: red; 
				font-weight: bold; }
			.center { text-align: center; font-size: 1.3em; }
		</style>

		<div id="content">
			<h2>게시판</h2>
			<table>
				<colgroup>
					<col style="width:10%" />
					<col />
					<col style="width:15%" />
					<col style="width:15%" />
					<col style="width:10%" />
				</colgroup>
				<!-- 제목행 시작 -->
				<tr><th>번호</th><th>제목</th>
					<th>작성자</th><th>작성일</th>
					<th>조회</th></tr>
				<!-- 제목행 끝 -->
				<%
					for( BoardVO v : BoardDAO.listBoard() ) {
				%>
				<!-- 본문행 출력시작 -->
				<tr>
					<td><%=v.getBdno() %></td>
					<td class="bdtitle"> 
					<a href="?action=view&bdno=<%=v.getBdno() %>">                          
						<%=v.getTitle() %></a> </td>
					<td><%=v.getUid() %></td>
					<td><%=v.getWdate().substring(0, 10) %></td>
					<td><%=v.getReades() %></td>
				</tr>
				<!-- 본문행 출력끝 -->
				<%
					}
				%>
			<tr><td colspan="5" style="text-align: right">
				<button type="button" onclick="location.href='?action=write';">글쓰기</button>
			</td></tr>	
			</table>
			<p class="center">◀ ◁◁ <span class="cpage">1</span> 2 3 4 5 6 7 8 9 10 ▷▷ ▶</p>
		</div><!-- // content -->





